import request from '@/utils/request'

/* GET /admin/product/getCategory1
getCategory1

GET /admin/product/getCategory2/{category1Id}
getCategory2

GET /admin/product/getCategory3/{category2Id}
getCategory3 */

export default {
  getCategory1() {
    return request.get('/admin/product/getCategory1')
  },
  getCategory2(category1Id) {
    return request.get(`/admin/product/getCategory2/${category1Id}`)
  },
  getCategory3(category2Id) {
    return request.get(`/admin/product/getCategory3/${category2Id}`)
  },

  /* GET /admin/product/attrInfoList/{category1Id}/{category2Id}/{category3Id}  attrInfoList*/
  attrInfoList(category1Id, category2Id, category3Id) {
    return request.get(`/admin/product/attrInfoList/${category1Id}/${category2Id}/${category3Id}`)
  },

  /* POST /admin/product/saveAttrInfo   saveAttrInfo */
  saveAttrInfo(AttrInfo){
      return request.post(`/admin/product/saveAttrInfo`,AttrInfo)
  },

 /*  DELETE /admin/product/deleteAttr/{attrId}  deleteAttr */
 deleteAttr(attrId){
     return request.delete(`/admin/product/deleteAttr/${attrId}`)
 }
}
